var app = getApp();
Page({
  data: {
    data_url: "",
    listInfo: {},
    obj:{
      a:"",
      b:"",
      c:""
    },
    bb:""
  },
  onLoad: function (options) {
    wx.showLoading({
      title: '加载中',
    })
    var that = this
    this.setData({
      data_url: app.globalData.data_url
    })
    if (options.type == "interationGoods"){
      wx.request({
        url: that.data.data_url + "/GPD/getInterationGoods.do",
        success:function(res){
          wx.hideLoading()
          that.setData({
            listInfo: res.data
          })
        }
      })
    } else {
      wx.request({
        url: that.data.data_url + "/GPD/getclassification.do",
        data: {
          type: options.type
        },
        success: function (res) {
          wx.hideLoading()
          that.setData({
            listInfo: res.data
          })
        }
      })
    }
  },
  jumpDetails: function (e) {
    wx.navigateTo({
      url: '/pages/details/details?id=' + e.target.dataset.id
    })
  },
  onReady: function () {

  },
  onShow: function () {

  },
  onHide: function () {

  },
  onUnload: function () {

  },
  onPullDownRefresh: function () {

  },
  onReachBottom: function () {

  }
})		